package org.judking.CarKeeper.service;

import java.util.List;

import org.judking.CarKeeper.activity.MainActivity;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.telephony.SmsManager;

public class SmsService	 {
	private static SmsManager smsManager;
	
	static		{
		smsManager = SmsManager.getDefault();
	}

	public synchronized static void sendText(String content, String phoneNo)		{
		PendingIntent sentIntent = PendingIntent.getBroadcast(StcActivityService.context, 0, new Intent(), 0);
		List<String> ms = smsManager.divideMessage(content);
		for(String s : ms)		{
			smsManager.sendTextMessage(phoneNo, null, s, sentIntent, null);
		}
	}
	
}
